<?php

namespace app\common\validate;

use think\Validate;

class MerchantCar extends Validate
{
    /**
     * 验证规则
     */
    protected $rule = [
	    'id' => 'require',
	    'banner' => 'require',
	    'car_id' => 'require',
	    'car_price' => 'require',
	    'car_deposit' => 'require',
	    'total_stock' => 'require',
	    'car_note' => 'require',
    ];
    /**
     * 提示消息
     */
    protected $message = [
	    'id.require' => '商家车辆id不得为空',
	    'banner.require' => '请上传轮播图',
	    'car_id.require' => '请选择车辆',
	    'car_price.require' => '请输入租车价格',
	    'car_deposit.require' => '请输入租车押金',
	    'total_stock.require' => '请输入车辆库存',
	    'car_note.require' => '请输入车辆详情',
    ];
    /**
     * 验证场景
     */
    protected $scene = [
        'add'  => ['banner','car_price','car_deposit','total_stock','car_note'],
        'edit' => ['id','banner','car_id','car_price','car_deposit','total_stock','car_note'],
    ];
    
}
